/*!
 * \file SocketException.h
 * \brief Declares the SocketExpection class.
 */

#pragma once
#include <exception>
#include <string>

namespace Networking
{
	/*!
	 * \class SocketExpection
	 * \brief A wrapper around sdt::exception to handel exceptions in the socket.
	 */
	class SocketException : std::exception
	{
	public:

		/*!
		 * \brief Constructor
		 *
		 * This constructor creates a SocketException to throw.
		 */
		SocketException ();

		/*!
		 * \brief Destructor
		 */
		virtual ~SocketException () throw();

		/*!
		 * \brief Gets the error
		 *
		 * This method returns a string with the error.
		 *
		 * \return A std::string holding the error value.
		 */
		std::string what()
		{
			return this->_exception;
		}

	protected:

		std::string _exception;/*< The error string.*/

	private:

		std::string GetError();
	};
}
